from .py_executor import PyExecutor
from .acm_executor import ACMExecutor
from .executor_types import Executor

def executor_factory(lang: str, is_leet: bool = False, is_acm: bool = False) -> Executor:
    """
    创建执行器
    
    Args:
        lang: 编程语言
        is_leet: 是否是LeetCode模式
        is_acm: 是否是ACM模式
        
    Returns:
        Executor: 执行器实例
    """
    if lang == "py" or lang == "python":
        if is_acm:
            return ACMExecutor()
        else:
            return PyExecutor()
    else:
        raise ValueError(f"Invalid language for executor: {lang}")
